//
//  ISSettingImgCollectionViewCell.m
//  iPhoneSafety
//
//  Created by dlon 2018/12/31.
//  Copyright © 2018年 com.li.ding. All rights reserved.
//

#import "ISSettingImgCollectionViewCell.h"
#import "NWLazyProperty.h"

@implementation ISSettingImgCollectionViewCell


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.contentView.backgroundColor = [UIColor nw_colorWithHex:0xEBEFF2];
        [self.contentView addSubview:self.titleLabel];
        [self.contentView addSubview:self.imgView];
        
        @weakify(self)
        [self.imgView mas_makeConstraints:^(MASConstraintMaker *make) {
            @strongify(self)
            make.left.right.bottom.equalTo(self.contentView);
            make.height.equalTo(self.imgView.mas_width).multipliedBy(270 / 375.f);
        }];
        
        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            @strongify(self)
            make.left.right.top.equalTo(self.contentView).insets(UIEdgeInsetsMake(0, 78, 0, 78));
            make.bottom.equalTo(self.imgView.mas_top);
        }];
    }
    return self;
}

#pragma mark - set & get

NWLazyPropertyWithInit(UIImageView, imgView, {
    
})

NWLazyPropertyWithInit(UILabel, titleLabel, {
    _titleLabel.font = [UIFont systemFontOfSize:18.f];
    _titleLabel.textColor = [UIColor nw_colorWithHex:0x222222];
    _titleLabel.textAlignment = NSTextAlignmentCenter;
    _titleLabel.text = @"触发警报或解锁失败后，会推送一个留言弹框";
    _titleLabel.numberOfLines = 0;
})

@end


